package day03;

public class IfElseIfDemo {
	public static void main(String[] args) {
		double price = 2000.0;
		if (price >= 2000){
			price *= 0.5;
		}else if (price>=1000){
			price *= 0.7;
		}else if (price>=500){
			price *= 0.8;
		}else {
			price *=0.9;
		}
		System.out.println("最终金额:"+price);


		System.out.println("--------------------我是分界线--------------------");


		double bor = 2000;
		if (bor <500){
			bor*=0.9;
		}else if (bor>=500 && bor<1000){
			bor *=0.8;
		}else if (bor>=1000 && bor<2000){
			bor *=0.7;
		}else{
			bor *=0.5;
		}
		System.out.println("最终金额:"+bor);


		System.out.println("--------------------我是分界线--------------------");



	}
}
